package com.zkx.laolaiyi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zkx.laolaiyi.handler.AESEncryptHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 用户类
 */
@Data
@TableName(value = "t_admin", autoResultMap = true)
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Admin {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "username", typeHandler = AESEncryptHandler.class)
    private String username;

    @TableField(value = "password", typeHandler = AESEncryptHandler.class)
    private String password;

    private Character status;

    @JsonIgnore
    private LocalDateTime createTime;

    @JsonIgnore
    private LocalDateTime updateTime;

    @JsonIgnore
    private Long createUser;

    @JsonIgnore
    private Long updateUser;
}
